-- GENERATED SPELL FOR [Sunfury Warp-Engineer] --


function spell0_18852(pUnit, Event) --@Electroshock,n/a--
pUnit:FullCastSpellOnTarget(35920,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18852', 2326, 1)
end

function spell1_18852(pUnit, Event) --@Welding Beam,n/a--
pUnit:FullCastSpellOnTarget(35919,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18852', 5000, 1)
end

function Sorts_18852(pUnit, Event)
local choix_sorts_18852 = math.random(0, 1)
if choix_sorts_18852 == 0 then
pUnit:RegisterEvent('spell0_18852', 1, 1)
end
if choix_sorts_18852 == 1 then
pUnit:RegisterEvent('spell1_18852', 1, 1)
end
end

function mob18852_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18852', math.random(1500, 3000), 1)
end

function mob18852_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18852_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18852_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18852, 1, 'mob18852_Action')
RegisterUnitEvent(18852, 2, 'mob18852_Leave')
RegisterUnitEvent(18852, 3, 'mob18852_Kill')
RegisterUnitEvent(18852, 4, 'mob18852_Die')
